using ASP;
using HoWave.Common;
using HoWave.Web;
using HoWave.Web.Admin;
using System;
using System.Data;
using System.Web.Profile;
using System.Web.SessionState;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
public class HL_Admin_Admin_PaymentType : Admin, IRequiresSessionState
{
	protected HyperLink HyperLink1;
	protected TextBox TxtPayName;
	protected RequiredFieldValidator RequiredFieldValidator1;
	protected DropDownList DropPayAttribute;
	protected DropDownList ShopOnlinePaytype;
	protected TextBox OnlinePayEmail;
	protected HtmlGenericControl AliPay1;
	protected HtmlGenericControl AliPay;
	protected TextBox Account;
	protected TextBox Md5Code;
	protected HtmlGenericControl other_onlinepya_account;
	protected TextBox OnlinePayFlag;
	protected HtmlGenericControl other_onlinepya_key;
	protected DropDownList outLinePayType;
	protected HtmlGenericControl downline;
	protected TextBox TxtDisCount;
	protected RequiredFieldValidator Rq2;
	protected RangeValidator Ra1;
	protected CheckBox ChDisable;
	protected TextBox TxtIntro;
	protected TextBox UserSavePass;
	protected RequiredFieldValidator Rq4;
	protected TextBox TextBox1;
	protected CompareValidator cv1;
	protected Label err_tips;
	protected Button OnLinePaySubmit;
	protected Literal JavascriptLiteral;
	private int payTypeID = 0;
	private Shop_PayType _shop_paytype = null;
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected Shop_PayType shop_paytype
	{
		get
		{
			Shop_PayType shop_paytype;
			if (this._shop_paytype == null)
			{
				this._shop_paytype = new Shop_PayType(this.conn);
				shop_paytype = this._shop_paytype;
			}
			else
			{
				shop_paytype = this._shop_paytype;
			}
			return shop_paytype;
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		this.other_onlinepya_account.Visible = false;
		this.payTypeID = Convert.ToInt32(Fetch.Get("typeID").ToString());
		this.loadpageinfo();
		this.showpage();
	}
	private void showpage()
	{
		if (this.DropPayAttribute.SelectedValue == "0")
		{
			this.AliPay.Visible = true;
			this.AliPay1.Visible = true;
			this.other_onlinepya_key.Visible = true;
			this.downline.Visible = false;
		}
		else
		{
			this.AliPay.Visible = false;
			this.AliPay1.Visible = false;
			this.other_onlinepya_key.Visible = false;
			this.downline.Visible = true;
		}
	}
	private void loadpageinfo()
	{
		DataTable typeByID = this.shop_paytype.GetTypeByID(Convert.ToInt32(this.payTypeID));
		this.TxtPayName.Text = typeByID.Rows[0]["TypeName"].ToString();
		this.OnlinePayEmail.Text = typeByID.Rows[0]["U_Email"].ToString();
		this.Account.Text = typeByID.Rows[0]["OnlinePayAccount"].ToString();
		this.OnlinePayFlag.Text = typeByID.Rows[0]["OnlinePayFlag"].ToString();
		this.DropPayAttribute.SelectedValue = typeByID.Rows[0]["PayAttribute"].ToString();
		this.ShopOnlinePaytype.SelectedValue = typeByID.Rows[0]["OnlinePay"].ToString();
		this.OnlinePayEmail.Text = typeByID.Rows[0]["OnlinePayAccount"].ToString();
		this.OnlinePayFlag.Text = typeByID.Rows[0]["OnlinePayFlag"].ToString();
		if (bool.Parse(typeByID.Rows[0]["IsDisabled"].ToString()))
		{
			this.ChDisable.Checked = true;
		}
		this.TxtIntro.Text = typeByID.Rows[0]["Intro"].ToString();
		this.TxtDisCount.Text = typeByID.Rows[0]["Discount"].ToString();
	}
	protected void OnLinePaySubmit_Click(object sender, EventArgs e)
	{
	}
}
